/**
 * <p>Copyright (c) 2016 深圳市鹏途交通科技有限公司</p>
 * <p>					All right reserved. 		 </p>
 * <p>项目名称 ： 	深圳公路信息资源整合及国省检日常化监管管理项目        </p>
 * <p>创建者   :	wy
 * <p>描   述  :  A7-07-施工作业区 </p>
 * <p>最后修改 :  $: 2017-5-26-下午3:16:11	wy   $     </p>
 * 
 */

package com.pengtu.gsj.entity.gcjs;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

@Entity
@Table(name = "T_PFB_FIELDOPERATION")
public class FieldOperation extends IdEntity {

	private static final long serialVersionUID = -9037207341140172017L;

	private String projectName; //项目名称
	
	private String supportPlan; //交通保障方案
	
	private String settingSpecifications; //作业区布设规范 
	
	private String year;	//年份
	
	private String remark; //备注
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	
	@Column(name = "PROJECTNAME")
	public String getProjectName() {
		return projectName;
	}

	public FieldOperation(String projectName) {
		this.projectName = projectName;
	}
	
	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	@Column(name = "SUPPORTPLAN")
	public String getSupportPlan() {
		return supportPlan;
	}

	public void setSupportPlan(String supportPlan) {
		this.supportPlan = supportPlan;
	}


	@Column(name = "SETTINGSPECIFICATIONS")
	public String getSettingSpecifications() {
		return settingSpecifications;
	}

	public void setSettingSpecifications(String settingSpecifications) {
		this.settingSpecifications = settingSpecifications;
	}

	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
